<%-- 
    Document   : AddMsnSupport
    Created on : 2008年11月28日, 下午11:27:48
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>MSN</h1>
        <%
        String returnurl = "http://219.77.153.221:8084/2handeasy/Test/AddMsnSupport.jsp";
        String privacy = "http://219.77.153.221:8084/2handeasy/Test/AddMsnSupport.jsp";

        String msnID = request.getParameter("id");
        String msnResult = request.getParameter("result");
        if (msnResult != null && msnResult.equals("Accepted")) {
            out.print("Your msn id is " + msnID + "<br/>");
            entity.Person member = util.LoginManager.getCurrentLoginPerson(session);
            if (member != null) {
                member.setMsn(msnID);
                entity.EntityManagerHelper.merge(member, entity.EntityManagerHelper.getFactory());
            }
        } else {
            out.print("erro in setup the msn a/c");
        }

        if (msnID == null) {
            msnID = "93e4375b79f9a8c9@apps.messenger.live.com";//"1146e9f57decdb9c@apps.messenger.live.com";//
        }
        %>
        <a href="http://settings.messenger.live.com/applications/websignup.aspx?returnurl=<%=returnurl%>&privacyurl=<%=privacy%>">加入 Windows Live Messenger 即時通訊控制項</a><br/>

        Buttom with name ====================
        <script type="text/javascript" src="http://settings.messenger.live.com/controls/1.0/PresenceButton.js"></script>
        <div
            id="Microsoft_Live_Messenger_PresenceButton_93e4375b79f9a8c9"
            msgr:width="100"
            msgr:backColor="#92D6AE"
            msgr:altBackColor="#FFFFFF"
            msgr:foreColor="#424542"
            msgr:conversationUrl="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=<%=msnID%>&mkt=zh-HK&useTheme=true&foreColor=333333&backColor=DCF2E5&linkColor=333333&borderColor=8ED4AB&buttonForeColor=2C0034&buttonBackColor=CFE9D9&buttonBorderColor=8ED4AB&buttonDisabledColor=CFE9D9&headerForeColor=006629&headerBackColor=92D6AE&menuForeColor=006629&menuBackColor=FFFFFF&chatForeColor=333333&chatBackColor=F4FBF7&chatDisabledColor=F6F6F6&chatErrorColor=760502&chatLabelColor=6E6C6C"></div>
        <script type="text/javascript" src="http://messenger.services.live.com/users/<%=msnID%>/presence?dt=&mkt=zh-HK&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>
        icon only ======================<br/>
        <a target="_blank" href="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=<%=msnID%>&mkt=zh-HK&useTheme=true&foreColor=333333&backColor=DCF2E5&linkColor=333333&borderColor=8ED4AB&buttonForeColor=2C0034&buttonBackColor=CFE9D9&buttonBorderColor=8ED4AB&buttonDisabledColor=CFE9D9&headerForeColor=006629&headerBackColor=92D6AE&menuForeColor=006629&menuBackColor=FFFFFF&chatForeColor=333333&chatBackColor=F4FBF7&chatDisabledColor=F6F6F6&chatErrorColor=760502&chatLabelColor=6E6C6C">
            <img style="border-style: none;" src="http://messenger.services.live.com/users/<%=msnID%>/presenceimage?mkt=zh-HK" width="16" height="16" />
        </a><br/>
        ===========================
    </body>
</html>
